{#**
*
* 功能描述（留言列表模板）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*#}
{#include file="header.tpl" title="title" active="member" #}
{#include file="define.tpl" scope=parent#}
<div class="content middle">
    <div class="ui breadcrumb">
        <a class="section" href="index.php">主页</a>
        <i class="right"></i>
        <span class="active section">会员管理</span>
    </div>

    <table class="ui table segment">
        <thead>
            <tr>
                <th>会员ID</th>
                <th style="width: 96px;">类型</th>
                <th>公司名称</th>
                <th>用户名</th>
                <th>姓名</th>
                <th>手机号</th>
                <th>剩余积分</th>
                <th>余额</th>
                <th style="width: 105px;">注册时间</th>
                <th style="width: 105px;">最后登录时间</th>
                <th>重置密码</th>
            </tr>
        </thead>
        <tbody>
            {#foreach $listdata as $item#}
                <tr>
                    <td><a href="index.php?action=user.info&id={#$item['id']#}">ID {#$item['id']#}</a></td>
                    <td>
                        {#$c_type = $item['type']#}
                        {#$c_lv = $item['level']#}
                        {#if isset($g_vips[$c_type])#}
                                {#$c_levels=$g_vips[$c_type]#}
                                {#if isset($c_levels[$c_lv])#}
                                        <select onchange="ajax_value(this, 'index.php?action=user.setlevel&id={#$item['id']#}&type={#$c_type#}&level=')">
                                        {#foreach $c_levels as $k => $v#}
                                                <option value="{#$k#}" {#if $k == $c_lv#}selected=true{#/if#}>{#$v#}</option>
                                        {#/foreach#}
                                        </select>
                                {#else#}
                                        异常会员级别{#$c_type#}_{#$c_lv#}
                                {#/if#}
                        {#else#}
                                异常会员类型{#$c_type#}
                        {#/if#}
                    </td>
					<td>{#$item['com_name']#}</td>
                    <td>{#$item['name']#}</td>
                    <td>{#$item['truename']#}</td>
                    <td>{#$item['mobile']#}</td>
                    <td>{#$item['score']#}</td>
                    <td>{#$item['money']#}</td>
                    <td>{#$item['regtime']#}</td>
                    <td>{#if isset($item['lastlogin']) and ($item['lastlogin'] != '0000-00-00 00:00:00')#}{#$item['lastlogin']#}{#/if#}</td>
                    <td>
                        <a href="index.php?action=user.setpwd&id={#$item['id']#}" onclick="ajax_this(this);return false">重置密码</a>
                    </td>
                </tr>
            {#/foreach#}
        </tbody>

        <tfoot>
            <tr>
                <th colspan="13" style="font-style: normal;">
                    {#include file="paging_bar.tpl"#}
                </th>
            </tr>
        </tfoot>
    </table>
</div>
{#include file="footer.tpl" #}
